
<?php defined( '_JEXEC' ) or die( 'Restricted access' ); ?><?php defined( '_SEXEC' ) or die( 'Restricted access' ); ?>

<?php
	if(!isset($_SESSION['username']) && !isset($_SESSION['usertype'])) {
?>	
		<form name='login-form' method='post' action='index.php?task=login'>
		<table border="0" cellspacing="3" cellpadding="3" align="center">
		<tr>
			<td colspan=2>
				<?php
					se();
				?>
			</td>
		</tr>
		<tr>
			<td align=right>Username :</td>
			<td><input type='text' name='username' value='<?php echo $_POST['username']?>'></td>
		</tr>
		<tr>
			<td align=right>Password :</td>
			<td><input type='password' name='password' value='<?php echo $_POST['password']?>'></td>
		</tr>
		<tr>
			<td colspan=2 align=right>
				<input type='submit' name='login' value='Login' class='button'>
			</td>
		</tr>
		</table>
		</form>
<?php	
	} else {
?>
<table border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td>
			<div id="cpanel">	
				<div style="float:left;">
					<div class="icon">
						<a href="user.php">
							<img src="images/user1.jpg" alt="User Management"  border='0'/>
							<span>User</span>
						</a>
					</div>
				</div>
				<div style="float:left;">
					<div class="icon">
						<a href="company.php">
							<img src="images/company.png" alt="Company Management"  border='0'/>
							<span>Company</span>
						</a>
					</div>
				</div>
				<div style="float:left;">
					<div class="icon">
						<a href="slab.php">
							<img src="images/slab1.png" alt="Slab Management"  border='0'/>
							<span>Slab</span>
						</a>
					</div>
				</div>
                            <div style="float:left;">
					<div class="icon">
						<a href="destination.php">
							<img src="images/destination1.png" alt="Destination Management"  border='0'/>
							<span>Destination</span>
						</a>
					</div>
				</div>
			</div>	
		</td>
	</tr>
	<tr>
		<td>
			<div id="cpanel">				
				<div style="float:left;">
					<div class="icon">
						<a href='entry.php'>
							<img src="images/entry1.jpg" alt="Entry Form"  border='0'/>
							<span>Daily Entry</span>
						</a>
					</div>
				</div>
				<div style="float:left;">
					<div class="icon">
						<a href='inventory.php'>
							<img src="images/inventory1.png" alt="Inventory Management"  border='0'/>
							<span>Bulk Entry</span>
						</a>
					</div>
				</div>
                            <div style="float:left;">
					<div class="icon">
						<a href="report.php">
							<img src="images/invoice_icon.jpg" alt="Report Management"  border='0'/>
							<span>Invoice</span>
						</a>
					</div>
				</div>
                            <div style="float:left;">
					<div class="icon">
						<a href='daily_report.php'>
							<img src="images/daily_report.png" alt="Backup Management"  border='0'/>
							<span>Daily Report</span>
						</a>
					</div>
				</div>
				
			</div>	
		</td>
	</tr>
	<tr>
		<td>
			<div id="cpanel">
				<div style="float:left;">
					<div class="icon">
						<a href="month_report.php">
							<img src="images/month_report.png" alt="Report Management"  border='0'/>
							<span>Month Report</span>
						</a>
					</div>
				</div>
                            <div style="float:left;">
					<div class="icon">
						<a href="statement.php">
							<img src="images/statement.png" alt="Setting Management"  border='0'/>
							<span>Statement</span>
						</a>
					</div>
				</div>
				<div style="float:left;">
					<div class="icon">
						<a href="setting.php">
							<img src="images/setting1.png" alt="Setting Management"  border='0'/>
							<span>Setting</span>
						</a>
					</div>
				</div>
				<div style="float:left;">
					<div class="icon">
						<a href='backup.php' onclick="javascript:return confirm('Want to take backup?')">
							<img src="images/backup1.png" alt="Backup Management"  border='0'/>
							<span>Backup</span>
						</a>
					</div>
				</div>
			</div>	
		</td>
	</tr>
</table>

<?php
	}
?>